using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.Hr.Attendance;


namespace HengTong.ViewModel.Hr.SysAttendanceShiftAndGroupVms
{
    public partial class SysAttendanceShiftAndGroupTemplateVm : BaseTemplateVM
    {
        public ExcelPropety ShiftExcel = ExcelPropety.CreateProperty<SysAttendanceShiftAndGroup>(x => x.ShiftId);
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysAttendanceShiftAndGroup>(x => x.GroupId);
        [Display(Name = "标签")]
        public ExcelPropety TagExcel = ExcelPropety.CreateProperty<SysAttendanceShiftAndGroup>(x => x.Tag);

	    protected override void InitVM()
        {
            ShiftExcel.DataType = ColumnDataType.ComboBox;
            ShiftExcel.ListItems = DC.Set<SysAttendanceShift>().GetSelectListItems(Wtm, y => y.Name);
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysAttendanceShiftGroup>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysAttendanceShiftAndGroupImportVm : BaseImportVM<SysAttendanceShiftAndGroupTemplateVm, SysAttendanceShiftAndGroup>
    {

    }

}
